#设置基础镜像
FROM centos:latest
#作者信息
MAINTAINER huangsheng

COPY jdk1.8.0_201 jdk1.8.0_201
COPY system-service-1.0.0.RELEASE.jar /application/app.jar
COPY config /application/config
#声明镜像内服务所监听的端口

ENV JAVA_HOME=/jdk1.8.0_201
ENV PATH=$JAVA_HOME/bin:$PATH
ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

EXPOSE 8002
ENTRYPOINT ["java", "-Dlogging.config=/application/config/logback.xml", "-jar", "/application/app.jar", "--spring.config.location=/application/config/application.yml"]

#docker run --name system -v /data/system-service/logs:/logs -v /data/system-service/tomcat-tmp:/tmp -v /data/system-service/config:/application/config -v /etc/localtime:/etc/localtime:ro -p 8002:8002 -d ca3d09d1569c